package com.minelx.table.core.series.source;

public class ArrayGridSource<E> implements GridSource<E> {
	private final E[][] source;

	public ArrayGridSource(E[][] source) {
		this.source = source;
	}

	@Override
	public E at(long rowAt, long columnAt) {
		return source[(int) rowAt][(int) columnAt];
	}

	@Override
	public long availableRow() {
		return source.length;
	}

	@Override
	public long availableColumn() {
		return source[0].length;
	}
}
